home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Borland Visual dBASE Professiona v7.0 / DATA1.CAB / Sample_Include / Mapi.h next >
Encoding:
C/C++ Source or Header  |  1997-11-20  |  6.4 KB  |  195 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  MAPI.H 
  4. //
  5. //  This is a header file containing definitions for various
  6. //  numeric properties of form controls, which used to be 
  7. //  enumerated.
  8. // 
  9. //  Dependencies: WIN32API.H
  10. //
  11. //  Visual dBASE Samples Group
  12. //
  13. //  $Revision:   1.2  $
  14. //
  15. //  Portions copyright (c) 1993-1995, Microsoft Corp. 
  16. //
  17. //---------------------------------------------------------------
  18.  
  19. //
  20. //  M A P I . H
  21. //
  22. //  Messaging Applications Programming Interface.
  23. //
  24. //  Purpose:
  25. //
  26. //    This file defines the structures and constants used by that
  27. //    subset of the Messaging Applications Programming Interface
  28. //    which is supported under Windows by Microsoft Mail for PC
  29. //    Networks version 3.x.
  30. //
  31.  
  32.  
  33. #ifndef MAPI_H
  34. #define MAPI_H
  35.  
  36. #include <WINDEF.H>
  37.  
  38. //
  39. //  Types.
  40. //
  41.  
  42.  
  43. #define LPULONG              CPTR ULONG
  44. #define FLAGS                ULONG
  45.  
  46. #ifndef LHANDLE
  47. #define LHANDLE              ULONG
  48. #define LPLHANDLE            CPTR ULONG
  49. #endif
  50.  
  51. #ifndef LPBYTE
  52. #define LPBYTE               CPTR
  53. #endif
  54.  
  55. #define    lhSessionNull     (0)
  56.  
  57. #define MapiFileDesc         CPTR
  58. #define lpMapiFileDesc       CPTR
  59.  
  60. #define MAPI_OLE             0x00000001
  61. #define MAPI_OLE_STATIC      0x00000002
  62.  
  63.  
  64. #define MapiFileTagExt       CPTR
  65. #define lpMapiFileTagExt     CPTR
  66.  
  67. #define MapiRecipDesc        CPTR
  68. #define lpMapiRecipDesc      CPTR
  69.  
  70. #ifndef MAPI_ORIG               // also defined in mapix.h
  71. #define MAPI_ORIG   0           // Recipient is message originator
  72. #define MAPI_TO     1           // Recipient is a primary recipient
  73. #define MAPI_CC     2           // Recipient is a copy recipient
  74. #define MAPI_BCC    3           // Recipient is blind copy recipient 
  75. #endif
  76.  
  77. #define MapiMessage          CPTR
  78. #define lpMapiMessage        CPTR
  79.  
  80. #define MAPI_UNREAD             0x00000001
  81. #define MAPI_RECEIPT_REQUESTED  0x00000002
  82. #define MAPI_SENT               0x00000004
  83.  
  84. //
  85. //  Entry points.
  86. //
  87.  
  88. //
  89. //  flFlags values for Simple MAPI entry points. All documented flags are
  90. //  shown for each call. Duplicates are commented out but remain present
  91. //  for every call.
  92. //
  93.  
  94. // MAPILogon() flags.
  95.  
  96. #define MAPI_LOGON_UI           0x00000001  // Display logon UI
  97. #ifndef MAPI_PASSWORD_UI
  98. #define MAPI_PASSWORD_UI        0x00020000  // prompt for password only
  99. #endif
  100. #define MAPI_NEW_SESSION        0x00000002  // Don't use shared session
  101. #define MAPI_FORCE_DOWNLOAD     0x00001000  // Get new mail before return
  102. #define MAPI_ALLOW_OTHERS       0x00000008  // Make this a shared session
  103. #define MAPI_EXPLICIT_PROFILE   0x00000010  // Don't use default profile
  104. #define MAPI_EXTENDED           0x00000020  // Extended MAPI Logon
  105. #define MAPI_USE_DEFAULT        0x00000040  // Use default profile in logon
  106.  
  107. #define MAPI_SIMPLE_DEFAULT  (bitor(bitor(MAPI_LOGON_UI, MAPI_FORCE_DOWNLOAD), MAPI_ALLOW_OTHERS))
  108. #define MAPI_SIMPLE_EXPLICIT (bitor(bitor(MAPI_NEW_SESSION, MAPI_FORCE_DOWNLOAD), MAPI_EXPLICIT_PROFILE))
  109.  
  110. // MAPILogoff() flags.
  111.  
  112. #define MAPI_LOGOFF_SHARED      0x00000001  // Close all shared session
  113. #define MAPI_LOGOFF_UI          0x00000002  // It's OK to present UI
  114.  
  115. // MAPISendMail() flags.
  116.  
  117. // #define MAPI_LOGON_UI        0x00000001   // Display logon UI
  118. // #define MAPI_NEW_SESSION     0x00000002   // Don't use shared session
  119.  
  120. #ifndef MAPI_DIALOG             // also defined in property.h 
  121. #define MAPI_DIALOG             0x00000008  // Display a send note UI
  122. #endif
  123. // #define MAPI_USE_DEFAULT     0x00000040   // Use default profile in logon
  124.  
  125. // MAPIFindNext() flags.
  126.  
  127. #define MAPI_UNREAD_ONLY        0x00000020  // Only unread messages
  128. #define MAPI_GUARANTEE_FIFO     0x00000100  // use date order
  129. #define MAPI_LONG_MSGID         0x00004000  // allow 512 char returned ID
  130.  
  131. // MAPIReadMail() flags.
  132.  
  133. #define MAPI_PEEK               0x00000080  // Do not mark as read.
  134. #define MAPI_SUPPRESS_ATTACH    0x00000800  // header + body, no files
  135. #define MAPI_ENVELOPE_ONLY      0x00000040  // Only header information
  136. #define MAPI_BODY_AS_FILE       0x00000200
  137.  
  138. // MAPISaveMail() flags.
  139.  
  140. // #define MAPI_LOGON_UI        0x00000001  //  Display logon UI
  141. // #define MAPI_NEW_SESSION     0x00000002  //  Don't use shared session
  142. // #define MAPI_LONG_MSGID      0x00004000  //  allow 512 char returned ID
  143.  
  144. // MAPIAddress() flags.
  145.  
  146. // #define MAPI_LOGON_UI        0x00000001   // Display logon UI
  147. // #define MAPI_NEW_SESSION     0x00000002   // Don't use shared session
  148.  
  149. // MAPIDetails() flags.
  150.  
  151. // #define MAPI_LOGON_UI        0x00000001   // Display logon UI            
  152. // #define MAPI_NEW_SESSION     0x00000002   // Don't use shared session
  153. #define MAPI_AB_NOMODIFY        0x00000400   // Don't allow mods of AB entries
  154.  
  155. // MAPIResolveName() flags.
  156.  
  157. // #define MAPI_LOGON_UI        0x00000001     Display logon Ui
  158. // #define MAPI_NEW_SESSION     0x00000002     Don't use shared session
  159. // #define MAPI_DIALOG          0x00000008     Prompt for choices if ambiguous
  160. // #define MAPI_AB_NOMODIFY     0x00000400     Don't allow mods of AB entries 
  161.  
  162. #ifndef SUCCESS_SUCCESS
  163. #define SUCCESS_SUCCESS                 0
  164. #endif
  165. #define MAPI_USER_ABORT                 1
  166. #define MAPI_E_USER_ABORT               MAPI_USER_ABORT
  167. #define MAPI_E_FAILURE                  2
  168. #define MAPI_E_LOGON_FAILURE            3
  169. #define MAPI_E_LOGIN_FAILURE            MAPI_E_LOGON_FAILURE
  170. #define MAPI_E_DISK_FULL                4
  171. #define MAPI_E_INSUFFICIENT_MEMORY      5
  172. #define MAPI_E_ACCESS_DENIED            6
  173. #define MAPI_E_TOO_MANY_SESSIONS        8
  174. #define MAPI_E_TOO_MANY_FILES           9
  175. #define MAPI_E_TOO_MANY_RECIPIENTS      10
  176. #define MAPI_E_ATTACHMENT_NOT_FOUND     11
  177. #define MAPI_E_ATTACHMENT_OPEN_FAILURE  12
  178. #define MAPI_E_ATTACHMENT_WRITE_FAILURE 13
  179. #define MAPI_E_UNKNOWN_RECIPIENT        14
  180. #define MAPI_E_BAD_RECIPTYPE            15
  181. #define MAPI_E_NO_MESSAGES              16
  182. #define MAPI_E_INVALID_MESSAGE          17
  183. #define MAPI_E_TEXT_TOO_LARGE           18
  184. #define MAPI_E_INVALID_SESSION          19
  185. #define MAPI_E_TYPE_NOT_SUPPORTED       20
  186. #define MAPI_E_AMBIGUOUS_RECIPIENT      21
  187. #define MAPI_E_AMBIG_RECIP              MAPI_E_AMBIGUOUS_RECIPIENT
  188. #define MAPI_E_MESSAGE_IN_USE           22
  189. #define MAPI_E_NETWORK_FAILURE          23
  190. #define MAPI_E_INVALID_EDITFIELDS       24
  191. #define MAPI_E_INVALID_RECIPS           25
  192. #define MAPI_E_NOT_SUPPORTED            26
  193.  
  194. #endif // MAPI_H
  195.